package com.chendx.store.goods.config;

import com.chendx.store.goods.netty.GoodsNettyServer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by chendx on 2022/4/25.
 */
@Configuration
public class NettyConfig {

    @Bean
    public GoodsNettyServer createGoodsNettyServer(){
        GoodsNettyServer goodsNettyServer = new GoodsNettyServer();

        new Thread(){
            @Override
            public void run(){
                goodsNettyServer.start(1234);
            }
        }.start();
        return goodsNettyServer;
    }


}
